
package com.jf.cloud.multishop.controller.admin;

import com.jf.cloud.common.response.ServerResponseEntity;
import com.jf.cloud.multishop.service.ShopCompanyService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springdoc.api.annotations.ParameterObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zz
 * @Date 2021/8/14 16:53
 */
@RestController("adminShopCompanyController")
@RequestMapping("/mp/shop_company")
@Tag(name = "admin-商家工商信息")
public class ShopCompanyController {

    @Autowired
    private ShopCompanyService shopCompanyService;

    @GetMapping("/check_credit_code")
    @Operation(summary = "检查统一信用码是否已存在" , description = "检查统一信用码是否已存在")
    public ServerResponseEntity<Boolean> checkCreditCode(@ParameterObject @RequestParam("creditCode") String creditCode, @ParameterObject @RequestParam("shopId") Long shopId) {
        Boolean res = shopCompanyService.checkCreditCode(creditCode, shopId);
        return ServerResponseEntity.success(res);
    }
}
